//
//  SecondViewController.m
//  UI09_homework
//
//  Created by aaaaaa on 16/6/16.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "SecondViewController.h"
#import "CustomScrollView.h"

@implementation SecondViewController

- (void)viewDidLoad{
    [super viewDidLoad];
    
    self.view.backgroundColor = [UIColor yellowColor];
    self.navigationItem.title = @"第二页";
    self.automaticallyAdjustsScrollViewInsets = NO;
    
    [self createScrollView];
}

- (void)createScrollView{
    CustomScrollView *scrollView = [[CustomScrollView alloc] initWithFrame:CGRectMake(0, 0, 198 * 2, 108 * 2)];
    scrollView.center = self.view.center;
    NSMutableArray<UIImage *> *imageArray = [NSMutableArray array];
    for (int i = 0; i < 6; i++) {
        UIImage *image = [UIImage imageNamed:[NSString stringWithFormat:@"%02d.jpg", i + 1]];
        [imageArray addObject:image];
    }
    scrollView.imageArray = imageArray;
    [self.view addSubview:scrollView];
    [scrollView release];
}





@end
